package com.kefu.chat.vo;

import java.util.ArrayList;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.kefu.basic.model.BasicTag;
import com.kefu.chat.model.ChatUser;
import com.kefu.robot.vo.RobotDocVo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

public class ChatAdminParam {

    @Data
    public static class AdminUserP {
        private String userId;
        private String sessionId;
    }

    @Data
    public static class AdminGetEventMsgP {
        @ApiModelProperty(value = "轮询id，登录或忙碌接口返回")
        private String pollId;
    }

    @Data
    public static class AdminGetEventMsgR {
        @ApiModelProperty(value = "event_type事件类型：" +
                "1100-会话建立（connectType：0用户转人工直接进入，1用户排队进入，2客服邀请用户进入，3另外客服转接用户进入，4抢接用户进线），" +
                "1101-收到新消息，1102-会话结束，1103-用户满意度评价，1104-用户正在输入，1105-会话被抢接，1106-客服回复超时，" +
                "1107-收到内部会话消息，1108-内部会话消息被撤回，1109-用户已读消息，1100-收到用户发起视频邀请，1111-收到用户发起语音邀请，1112-用户消息变更" )
        private List msgList;
        @ApiModelProperty(value = "排队人数")
        private long waitSize;
        @ApiModelProperty(value = "客服状态：0离线，1在线，2忙碌")
        private int status;

    }

    @Data
    public static class AdminSendMsgP {
        private String userId;
        @ApiModelProperty(value = "消息类型：1.文字，2图片，3富文本，4文件，5音频，6视频，7商品卡片，8订单卡片")
        private int msgType;
        private String msgContent;
        private String fileName;
        private String sessionId;
        @ApiModelProperty(value = "1.从在线列表发送，2.从离线列表发送")
        private int from;
        @ApiModelProperty(value="音频时长，秒")
        private Integer audioDuration;
    }

    @Data
    public static class AdminSysMsgP {
        private String userId;
        private String sessionId;
        @ApiModelProperty(value="消息内容")
        private String msgContent;
        @ApiModelProperty(value = "展示位置：0.两端都展示，1.展示在坐席端，2.展示在客户端")
        private int clientType;
    }

    @Data
    public static class AdminSendMsgR {
        private String msgId;
        private Long msgTime;
        private List<String> sensitiveWords;
        @ApiModelProperty(value = "消息已读未读 0=未读，1=已读，空值不展示")
        private Integer readFlag;
    }

    @Data
    public static class AdminTransferUserP {
        private String userId;
        @ApiModelProperty(value = "需要转接的客服id")
        private String toAdminId;
    }

    @Data
    public static class AdminOnlineUserR extends ChatUser {
        @ApiModelProperty(value = "会话最后一句话时间")
        private long lastMsgTime;
        @ApiModelProperty(value = "会话最后消息内容")
        private String lastMsgContent;
        @ApiModelProperty(value = "会话最后消息类型")
        private Integer lastMsgType;
        @ApiModelProperty(value = "是否评价客服：0否，1是")
        private int evaluateAdminMode;
        @ApiModelProperty(value = "客服回复超时，0未超时，1超时")
        private int adminTimeout;
        @ApiModelProperty(value = "会话中最后一句话说话人")
        private String lastMsgSender;
        @ApiModelProperty(value = "会话中最后一句话发送者类型:1用户，2客服，3机器人，4系统")
        private Integer lastMsgSenderType;;
        @ApiModelProperty(value = "会话中最后一句话说话人名称")
        private String lastMsgSenderName;
        @ApiModelProperty(value = "标签集合")
        private List<BasicTag> basicTags;
        @ApiModelProperty("坐席消息数")
        private int adminMsgCount;
    }

    @Data
    public static class AdminWaitUserP {
        @ApiModelProperty
        private String groupId;
        private int pageNo;
        private int pageSize;
    }
    @Data
    public static class AdminWaitUserR {
        private String userId;
        private String userName;
        @ApiModelProperty(value = "渠道类型： 1桌面网站，2移动网站， 3APP， 4微信， 5小程序， 6企业微信")
        private int channelType;
        @ApiModelProperty(value = "渠道名称")
        private String channelName;
        @ApiModelProperty(value = "技能组id")
        private String groupId;
        @ApiModelProperty(value = "技能组名称")
        private String groupName;
        @ApiModelProperty
        private String referer;
        @ApiModelProperty(value = "建立排队的时间")
        private long waitTime;
        @ApiModelProperty(value = "等待时长，秒")
        private Long waitDuration;
        private String sessionId;
    }

    @Data
    public static class AdminGetHistorySessionP {
        @ApiModelProperty(value = "每页大小")
        private int pageSize=15;
        @ApiModelProperty(value = "用户id，如果有值，查询用户的会话，如果没有值，查询客服接待过的会话")
        private String userId;
        @ApiModelProperty(value = "用户名称")
        private String userName;
        @ApiModelProperty(value = "客户id")
        private String customerId;
        @ApiModelProperty(value = "是否星标：0否，1是")
        private Integer markMode;
        @ApiModelProperty(value = "消息内容")
        private String msgContent;
        @ApiModelProperty(name = "offlineTimeStart", value = "会话结束时间开始")
        private Long offlineTimeStart;
        @ApiModelProperty(name = "offlineTimeEnd", value = "会话结束时间结束")
        private Long offlineTimeEnd;
    }

    @Data
    public static class  AdminMarkUserP {
        @ApiModelProperty(value = "1打星标，0取消星标")
        private int markMode;
        private String userId;
        private String sessionId;
    }

    @Data
    public static class  AdminBlackUserP {
        @ApiModelProperty(value = "1拉黑，0取消拉黑")
        private int blackMode;
        private String userId;
        @ApiModelProperty("拉黑原因")
        private String content;
        private String sessionId;
    }

    @Data
    public static class AdminUpdateUserP {
        private String userId;
        private String userName;
        private String customerId;
        private String sessionId;
    }

    @Data
    public static class AdminSummary {
        private String sessionId;
        @ApiModelProperty(name = "summaryMode", value = "是否会话总结：0否，1是")
        private Integer summaryMode;
        @ApiModelProperty(name = "summarySolve", value = "会话总结是否解决：0否，1是")
        private Integer summarySolve;
        @ApiModelProperty(name = "summaryType", value = "会话总结类型")
        private String summaryType;
        @ApiModelProperty(name = "summaryTypeName", value = "会话总结类型名称")
        private String summaryTypeName;
        @ApiModelProperty(name = "summaryRemark", value = "服务总结")
        private String summaryRemark;
        
    }

    @Data
    public static class AdminGetReplyListP {
        @ApiModelProperty(name = "type", value = "类型：0公共，1自己")
        private int type;
    }

    @Data
    public static class AdminRobotAskP {
        @ApiModelProperty(value = "问题")
        private String question;
        @ApiModelProperty(value = "点选问题的时候，需要传递docId")
        private String docId;
        @ApiModelProperty(value = "机器人标识，0公共知识库，>0业务知识库，-9内部知识库")
        private List<Integer> robotList;
    }
    @Data
    public static class AdminRobotAskR {
        private String answer;
        private Integer robotNo;
        @ApiModelProperty(value = "命中的标准问题")
        private String question;
        private String docId;
        private float score;
        @ApiModelProperty(value = "模式：0单轮问题，1多轮问题")
        private Integer docPattern;
        @ApiModelProperty(value = "机器人建议")
        private List<RobotDocVo> suggestList = new ArrayList<>();
    }
    @Data
    public static class AdminRobotSuggest extends RobotDocVo {
        private float score;
        private String answer;
        private Integer robotNo;
    }

    @Data
    public static class AdminRecallMsgP {
        private String userId;
        @ApiModelProperty(value = "消息id")
        private String msgId;
    }

    @Data
    public static class AdminGetHistoryMsgP {
        @ApiModelProperty
        private String userId;
        @ApiModelProperty(value = "根据最大时间往前翻页，如果为0，查询当前会话所有纪录")
        private long maxTime;
        @ApiModelProperty(value = "每页大小")
        private int pageSize=20;
        private String sessionId;
        @ApiModelProperty(value = "清理html标签，0不清理，1清理")
        private int cleanHtmlTag = 0;
    }

    @Data
    public static class AdminStatusChangeP {
        @NotNull
        @ApiModelProperty(value="状态", name = "1=上线，2=忙碌，3=离线，非123则为忙碌")
        private Integer status;
    }


    @Data
    public static class AdminOfflineP {
        @NotEmpty
        @ApiModelProperty(value="坐席id")
        private String adminId;
    }

}
